Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cherry-pick #13078 and #13046 #13123

Merged
merged 2 commits into from
Nov 1, 2023
Merged

fix: cherry-pick #13078 and #13046 #13123

merged 2 commits into from
Nov 1, 2023

Conversation

zwang28
Copy link
Contributor

@zwang28 zwang28 commented Oct 30, 2023

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

close #13093

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

@zwang28 zwang28 requested a review from a team as a code owner October 30, 2023 01:47
@zwang28 zwang28 requested a review from lmatz October 30, 2023 01:47
@github-actions github-actions bot added the type/fix Bug fix label Oct 30, 2023
@zwang28 zwang28 enabled auto-merge (squash) October 30, 2023 01:48
@zwang28 zwang28 disabled auto-merge October 31, 2023 02:30
@zwang28
Copy link
Contributor Author

zwang28 commented Oct 31, 2023

@kwannoel

I encountered a fuzzing test error, which I believe was not caused by this PR. Has it been fixed in main branch?

2022-08-24T01:04:16.275573Z ERROR node{id=7 name="frontend-1"}:task{id=606}:process_query_msg_one_stmt{session_id=0 stmt=CREATE MATERIALIZED VIEW m10 AS SELECT TIMESTAMP '2022-04-19 10:04:39' AS col_0, (approx_count_distinct(hop_0.c13) FILTER(WHERE false) + hop_0.c3) AS col_1, hop_0.c4 AS col_2, internal_last_seen_value(DISTINCT (hop_0.c13 + hop_0.c10)) FILTER(WHERE CAST((INT '321') AS BOOLEAN)) AS col_3 FROM hop(alltypes2, alltypes2.c11, INTERVAL '61', INTERVAL '61') AS hop_0 WHERE hop_0.c1 GROUP BY hop_0.c11, hop_0.c4, hop_0.c6, hop_0.c1, hop_0.c14, hop_0.c3}: risingwave_frontend::session: failed to handle sql:
CREATE MATERIALIZED VIEW m10 AS SELECT TIMESTAMP '2022-04-19 10:04:39' AS col_0, (approx_count_distinct(hop_0.c13) FILTER(WHERE false) + hop_0.c3) AS col_1, hop_0.c4 AS col_2, internal_last_seen_value(DISTINCT (hop_0.c13 + hop_0.c10)) FILTER(WHERE CAST((INT '321') AS BOOLEAN)) AS col_3 FROM hop(alltypes2, alltypes2.c11, INTERVAL '61', INTERVAL '61') AS hop_0 WHERE hop_0.c1 GROUP BY hop_0.c11, hop_0.c4, hop_0.c6, hop_0.c1, hop_0.c14, hop_0.c3:
Bind error: failed to bind expression: internal_last_seen_value(DISTINCT (hop_0.c13 + hop_0.c10)) FILTER(WHERE CAST((INT '321') AS BOOLEAN))

Caused by:
  Invalid input syntax: DISTINCT, ORDER BY or FILTER is only allowed in aggregation functions, but `internal_last_seen_value` is not an aggregation function
2022-08-24T01:04:16.275573Z  INFO node{id=7 name="frontend-1"}:task{id=606}: pgwire_query_log: mode=(simple query) session=0 status=err time=0ms sql=CREATE MATERIALIZED VIEW m10 AS SELECT TIMESTAMP '2022-04-19 10:04:39' AS col_0, (approx_count_distinct(hop_0.c13) FILTER(WHERE false) + hop_0.c3) AS col_1, hop_0.c4 AS col_2, internal_last_seen_value(DISTINCT (hop_0.c13 + hop_0.c10)) FILTER(WHERE CAST((INT '321') AS BOOLEAN)) AS col_3 FROM hop(alltypes2, alltypes2.c11, INTERVAL '61', INTERVAL '61') AS hop_0 WHERE hop_0.c1 GROUP BY hop_0.c11, hop_0.c4, hop_0.c6, hop_0.c1, hop_0.c14, hop_0.c3
2022-08-24T01:04:16.275573Z ERROR node{id=7 name="frontend-1"}:task{id=606}: pgwire::pg_protocol: error when process message error=QueryError: Bind error: failed to bind expression: internal_last_seen_value(DISTINCT (hop_0.c13 + hop_0.c10)) FILTER(WHERE CAST((INT '321') AS BOOLEAN))

Caused by:
  Invalid input syntax: DISTINCT, ORDER BY or FILTER is only allowed in aggregation functions, but `internal_last_seen_value` is not an aggregation function
2022-08-24T01:04:16.280404Z  INFO node{id=14 name="client"}:task{id=605}: risingwave_sqlsmith::runner: [UNEXPECTED ERROR]: Error {
    kind: Db,
    cause: Some(
        DbError {
            severity: "ERROR",
            parsed_severity: None,
            code: SqlState(
                EXX000,
            ),
            message: "QueryError: Bind error: failed to bind expression: internal_last_seen_value(DISTINCT (hop_0.c13 + hop_0.c10)) FILTER(WHERE CAST((INT '321') AS BOOLEAN))\n\nCaused by:\n  Invalid input syntax: DISTINCT, ORDER BY or FILTER is only allowed in aggregation functions, but `internal_last_seen_value` is not an aggregation function",
            detail: None,
            hint: None,
            position: None,
            where_: None,
            schema: None,
            table: None,
            column: None,
            datatype: None,
            constraint: None,
            file: None,
            line: None,
            routine: None,
        },
    ),
}

@kwannoel
Copy link
Contributor

Didnt see this before. Looks like a regression perhaps. Taking a look.

@kwannoel
Copy link
Contributor

internal_last_seen_value should not be used. I guess it still works in latest main. Let me ban it.

@kwannoel
Copy link
Contributor

internal_last_seen_value should not be used. I guess it still works in latest main. Let me ban it.

Building new snapshot https://buildkite.com/risingwavelabs/generate-sqlsmith-snapshots-weekly/builds/129

Copy link

codecov bot commented Nov 1, 2023

Codecov Report

❗ No coverage uploaded for pull request base (v1.3-rc@d7637cf). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             v1.3-rc   #13123   +/-   ##
==========================================
  Coverage           ?   69.42%           
==========================================
  Files              ?     1474           
  Lines              ?   242937           
  Branches           ?        0           
==========================================
  Hits               ?   168659           
  Misses             ?    74278           
  Partials           ?        0           
Flag Coverage Δ
rust 69.42% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@kwannoel kwannoel merged commit df5b41f into v1.3-rc Nov 1, 2023
8 of 9 checks passed
@kwannoel kwannoel deleted the wangzheng/v1.3-rc branch November 1, 2023 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/fix Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants